
<?php
$this->breadcrumbs=array(
	'Event Category',
);
?> 

<div>
	<div class="pull-right">
		<div class="widget-toolbar">				
			<a href="<?php echo Yii::app()->createUrl('bookingsystem/event/create_event_category'); ?>" role="button" class="white" data-toggle="modal"  title="Add new category">
				<i class="icon-plus"></i>
			</a>
		</div>
	</div>
</div>
<div class="row-fluid">
	<div class="table-header">
		Event Category
	</div>

	<table id="sample-table-2" class="table table-striped table-bordered table-hover">
		<thead>
			<tr>
				<th class="center">
					<label>
						<input type="checkbox" />
						<span class="lbl"></span>
					</label>
				</th>
				<th>Name</th>
				<th>Description</th>
				<th class="hidden-480">Status</th>

				<th class="hidden-phone">
					Icon
				</th>
				<th class="hidden-480">Priority</th>

				<th></th>
			</tr>
		</thead>

		<tbody>
			<?php foreach($data as $event_cat) : ?>
			<tr>
				<td class="center">
					<label>
						<input type="checkbox" />
						<span class="lbl"></span>
					</label>
				</td>

				<td>
					<a href="#"><?php echo $event_cat->name; ?></a>
				</td>
				<td><?php echo $event_cat->description; ?></td>
				
				<td class="hidden-480">
					<?php if($event_cat['status'] == 0) : ?>
						<span class="label label-success">Active</span>
					<?php else : ?>
						<span class="label label-default">Inactive</span>
					<?php endif; ?>
				</td>
				<td class="hidden-phone"><img class="thumbnails" src="data:image/png;base64,<?php echo $event_cat['icon']; ?>"></td>

				<td class="hidden-480">
					<?php echo $event_cat['priority']; ?>
				</td>

				<td class="td-actions">
					<div class="hidden-phone visible-desktop action-buttons">

						<a class="green" href="<?php echo Yii::app()->createUrl('bookingsystem/event/edit_cat',array('id' => $event_cat->id)); ?>">
							<i class="icon-pencil bigger-130"></i>
						</a>

						<a class="red" href="<?php echo Yii::app()->createUrl('bookingsystem/event/delete_cat',array('id' => $event_cat->id)); ?>">
							<i class="icon-trash bigger-130"></i>
						</a>
					</div>

					<div class="hidden-desktop visible-phone">
						<div class="inline position-relative">
							<button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
								<i class="icon-caret-down icon-only bigger-120"></i>
							</button>

							<ul class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">

								<li>
									<a href="<?php echo Yii::app()->createUrl('bookingsystem/event/edit_cat',array('id' => $event_cat->id)); ?>" class="tooltip-success" data-rel="tooltip" title="Edit">
										<span class="green">
											<i class="icon-edit bigger-120"></i>
										</span>
									</a>
								</li>

								<li>
									<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
										<span class="red">
											<i class="icon-trash bigger-120"></i>
										</span>
									</a>
								</li>
							</ul>
						</div>
					</div>
				</td>
			</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
</div>
<!-- Popup -->
<!-- <div id="modal-form" class="modal hide" tabindex="-1">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal">&times;</button>
		<h4 class="blue bigger">Add new Category</h4>
	</div>

	<div class="modal-body overflow-visible">
		<div class="row-fluid">
			<div class="span12">
				<div class="control-group">
					<label class="control-label" for="form-field-username">Name</label>

					<div class="controls">
						<input type="text" placeholder="Category Name" name="EventCategory[name]" />
					</div>
					<label class="control-label" for="form-field-first">Description</label>

					<div class="controls">
						<input class="input-small" type="text" placeholder="Description" name="EventCategory[description]" />
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="modal-footer">
		<button class="btn btn-small" data-dismiss="modal">
			<i class="icon-remove"></i>
			Cancel
		</button>

		<button class="btn btn-small btn-primary">
			<i class="icon-ok"></i>
			Save
		</button>
	</div>
</div> -->